---
title: SAIF.Application overview
summary: High-level purpose, scope, and responsibilities for this library.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Application
reference_type: embedded
---

# SAIF.Application overview

> **Documentation context:** Front-End Application Component
> **Documented via:** LegalMaintenance (LegalMaintenance/LegalMaintenance.vbproj)

`SAIF.Application` is the domain-neutral application-layer foundation beneath `SAIF.Application.Claim`, `SAIF.Application.Claim.Legal`, and the `LegalMaintenance` WebForms UI. It supplies the manager lifecycle contract, an access-classification state machine, authorization-result caching, data-portal provisioning, message accumulation, and a lighter service-style response envelope, but carries no domain knowledge, SQL, or UI logic of its own.

## Purpose
- Provides the abstract lifecycle template (`AppManagerBase`) every application manager in the solution follows: construct-with-identity → `Initialize` → context validation → security evaluation → `Retrieve` / `Write`.
- Provides a reusable, deny-by-default access classification (`AppSecurityRole`), an authorization-decision cache (`UserAccess`), data-portal provisioning (`ApplicationDataAccess`), de-duplicated message accumulation, and a stateless service-manager envelope (`clsServiceAppManagerBase`, `ServiceResponse`) for domain application layers to build on.
- Consumed exclusively as an embedded (ProjectReference) library by `SAIF.Application.Claim`, `SAIF.Application.Claim.Legal`, and `LegalMaintenance` within this solution; it is not published as a NuGet package.

## Responsibilities
- Application manager lifecycle contract (`AppManagerBase`).
- Access classification state machine (`AppSecurityRole`, `Mark*` methods, `Is*` properties).
- Authorization result caching (`UserAccess`).
- Data-portal provisioning and DPI registry (`ApplicationDataAccess`).
- User-message accumulation and channel-specific formatting (`AppendMessageLines`, `MessageFormatting`).
- Service-style response envelope (`clsServiceAppManagerBase`, `ServiceResponse`, `ServiceMessage`, `ServiceMessageType`).

## Key components
- `AppManagerBase`: stateful, security-aware manager base class that owns identity binding, a lazily built data layer, the message buffer, and the access classification.
- `UserAccess`: per-instance authorization-decision cache over `clsSecurityPrincipal.IsAuthorized`.
- `ApplicationDataAccess`: builds Oracle or SQL Server data portals from connection properties and registers them in a keyed `IDataPortalInfo` registry.
- `clsServiceAppManagerBase` / `ServiceResponse` / `ServiceMessage`: a parallel, stateless manager style for service/API callers with an injected data portal and categorized message output.
- `MessageFormatting` / `AppConstants`: shared message-formatting helpers and the single shared constant (`SAIFVALUE`).

## Related documentation
- [Index](index.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)

## Sources
- `SAIF.Application/AppManagerBase.vb`
- `SAIF.Application/UserAccess.vb`
- `SAIF.Application/ApplicationDataAccess.vb`
- `SAIF.Application/Service Based/clsServiceAppManagerBase.vb`
- `SAIF.Application/AppConstants.vb`
- `SAIF.Application/SAIF.Application.vbproj`
